import React from 'react';
import { Modal, Button,} from 'antd';
import './login.css'
import { Input ,Select} from 'antd';
import { connect } from 'react-redux'
import { DatePicker } from 'antd';
import QRCode from 'qrcode.react'
import {withRouter } from 'react-router-dom'
import {huoZhongList,diDianClassList,huoZhuList,TransportAddClass2} from '../../redux/transportClass/transportClass'
const Option = Select.Option;
const { RangePicker } = DatePicker;
@withRouter
@connect(
    state => state,
    {huoZhongList,diDianClassList,huoZhuList,TransportAddClass2}
)
export default class WXLogin extends React.Component {
    constructor(){
        super();
        
    }
    componentWillReceiveProps(){
        if(this.props.visible){
            let WxLogin1 = window.WxLogin1;
            let wx = new WxLogin1(
            {
                id:"wxlogins",
                appid:'wxe95248d3c4243896',
                scope:'snsapi_login',
                redirect_uri:'http://www2.yihangotms.com/otms2/#/login/1'
            }
            )
        }
    }
   
    onOk(){

    }
    componentDidMount(){
    }
    render() {
        return (
            <Modal
              title="微信登陆"
              visible={this.props.visible}
              onOk={this.handleOk}
              footer={null}
              wrapClassName="submiss"
              onCancel={()=>this.props.showModel()}
            >
            <div id="wxlogins" style={{width:'100%',margin:'0 auto',textAlign:'center'}}>
                
             </div>
            </Modal>
        );
    }
}